#!/usr/bin/python
# -*- coding:utf-8 -*-
# -------------------------------------------------------
# @author  : 龍皓
# @time    : 2025/2/25 21:56
# @function: the script is used to do something.
# @version : 1.0.0
# -------------------------------------------------------

# 使用连接池提升数据库性能
from DBUtils.PooledDB import PooledDB

class ConnectionPool:
    def __init__(self, config):
        self.pool = PooledDB(
            creator=pymysql,
            maxconnections=10,
            **config
        )